package com.pfzy.utildemo.activity.record.soundrecord;

import android.os.Parcel;
import android.os.Parcelable;

public class RecordingInfo implements Parcelable {
    public static final Creator<RecordingInfo> CREATOR = new Creator<RecordingInfo>() {
        @Override
        public RecordingInfo createFromParcel(Parcel in) {
            return new RecordingInfo(in);
        }

        @Override
        public RecordingInfo[] newArray(int size) {
            return new RecordingInfo[size];
        }
    };
    private int bizLine;
    private String orderNo;
    private int splitTimeIntervalMs; // 拆分时间间隔Ms
    private String uid;
//    private int utype;

    public RecordingInfo(int bizLine, String orderNo, int splitTimeIntervalMs, String uid) {
        this.bizLine = bizLine;
        this.orderNo = orderNo;
        this.splitTimeIntervalMs = splitTimeIntervalMs;
        this.uid = uid;
    }

    public RecordingInfo() {
        this.splitTimeIntervalMs = 60000;
    }

    protected RecordingInfo(Parcel in) {
        this.splitTimeIntervalMs = 60000;
//        this.uid = in.readString();
        this.orderNo = in.readString();
//        this.utype = in.readInt();
        this.bizLine = in.readInt();
        this.splitTimeIntervalMs = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
//        dest.writeString(this.uid);
        dest.writeString(this.orderNo);
//        dest.writeInt(this.utype);
        dest.writeInt(this.bizLine);
        dest.writeInt(this.splitTimeIntervalMs);
    }

    @Override
    public int describeContents() {
        return 0;
    }

//    public int getUtype() {
//        return this.utype;
//    }
//
//    public void setUtype(int utype) {
//        this.utype = utype;
//    }

    public int getBizLine() {
        return this.bizLine;
    }

    public void setBizLine(int bizLine) {
        this.bizLine = bizLine;
    }

    public String getOrderNo() {
        return this.orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getUid() {
        return this.uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public int getSplitTimeIntervalMs() {
        return this.splitTimeIntervalMs;
    }

    public void setSplitTimeIntervalMs(int splitTimeIntervalMs) {
        this.splitTimeIntervalMs = splitTimeIntervalMs;
    }

    @Override
    public String toString() {
        return "RecordingInfo{" +
                "bizLine=" + bizLine +
                ", orderNo='" + orderNo +
                ", splitTimeIntervalMs=" + splitTimeIntervalMs +
                '}';
    }
}
